package cn.wolfcode.crm.service;

import cn.wolfcode.crm.domain.SpendPointItem;
import cn.wolfcode.crm.query.SpendPointQueryObject;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.math.BigDecimal;
import java.text.ParseException;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface ISpendPointItemService {

    List<SpendPointItem> selectAll(SpendPointQueryObject qo);

    /**
     * 验证名称
     * @param id
     * @param name
     * @return
     */
    Boolean selectByName(Long id, String name);


    void saveOrUpdate(SpendPointItem spendPointItem);

    void delete(Long id);

    List<SpendPointItem> selectExportData(SpendPointQueryObject qo);

    void importData(MultipartFile file) throws IOException;

    //查询今日支出总额
    BigDecimal selectAmountByDay() throws ParseException;

    //查询本月支出总额
    BigDecimal selectAmountByMouth() throws ParseException;

    //查询累计支出金额
    BigDecimal selectAllAmount();

    int selectSpendTimes();

    List<SpendPointItem> querybyDate(Date beginDate, Date endDate);

    BigDecimal queryAvgSpend();

    BigDecimal queryMaxSpend();

    List<Map<String,Object>> items(SpendPointQueryObject qo);

    List<Map<String,Object>> zitems(SpendPointQueryObject qo);
}


